﻿<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" 
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xml:lang="en" lang="en">
	<h:head>
	</h:head>
	<body>
		<p>
			<h:form id="form">
				<table width="750" height="356" border="0" align="center" cellpadding="0" cellspacing="4">
					<tr>
						<td colspan="4" align="center">
							<font color="red">*</font>(为必填选项)
						</td>
					</tr>
					<tr>
						<td align="right" width="100">
							<h:outputText value=" 标 题  *"></h:outputText>			
						</td>
						<td colspan="3" align="left" width="650">
							<h:inputText value="#{modifyDocument.title}" style="width: 400px;height: 18px;"></h:inputText>	
							<h:message for="tit" style="color:red"/>
						</td>
						
					</tr>
					<tr>
						<td align="right">
							<h:outputText value="简短标题"></h:outputText>
							
						</td>
						<td colspan="3">
							<h:inputText value="#{modifyDocument.simpletitle}" style="width: 400px;height: 18px;"></h:inputText>
						</td>
					</tr>
					
					<tr>
						<td align="right">
							<h:outputText value="作          者  *"></h:outputText>
							
						</td>
						<td align="left" width="100">
							<h:inputText value="#{modifyDocument.label}"></h:inputText>
	
							
						</td>
						<td align="left" width="90">
							<h:message for="author" style="color:red"></h:message>	
						</td>
						<td align="left">	
							<h:outputLabel value=" 标   签 *"></h:outputLabel>
							<h:inputText value="#{modifyDocument.label}" id="label">
							</h:inputText>
							<h:message for="label" style="color:red"></h:message>
						</td>
						
						
					</tr>
				    <tr>
						<td align="right">
							<h:outputText value="关键词*"></h:outputText>		
						</td>
						<td align="left" width="100">
							<h:inputText value="#{modifyDocument.keywords}" id="keywords" />		
						</td>
						<td align="left" width="90">
							<h:message for="keywords" style="color:red"></h:message>
						</td>
						<td>
							<h:outputText value=" 主   题 *"></h:outputText>
							<h:inputText value="#{modifyDocument.themewords}" id="themewords" />
							<h:message for="themewords" style="color:red"></h:message>
						</td>
						
					</tr>
					 <tr>
						<td align="right">
						   <h:outputText value="分       类*  "></h:outputText>
							
						</td>
						<td align="left" width="100">
							<h:selectOneMenu value="#{documentType.typeId}">
								<f:selectItems value="#{documentType.doccumentTypes}" />
							</h:selectOneMenu>	
							
						</td>
						<td width="400" align="left" colspan="2">
						目录类别：
						<c:choose>
							<c:when test="#{selectBean.firstSize != 0}">	
						<h:selectOneMenu value="#{selectBean.currentType}"
									valueChangeListener="#{selectBean.valueChanged}">
								<f:selectItems value="#{selectBean.firstList}" />
									<f:ajax event="valueChange" render="second" execute="@this"/>
							</h:selectOneMenu>							
							<h:selectOneMenu id="second" value="#{selectBean.currentType1}" >
							<f:selectItems value="#{selectBean.secondList}" />
							</h:selectOneMenu>
							</c:when>
							<c:otherwise>
								您还没有添加目录类别，请先<a href="addClassify.jsf">添加</a>。
							</c:otherwise>
						</c:choose>		
						</td>
					
					</tr>
					<tr>
						<td align="right">
							<h:outputText value="图书年份  "></h:outputText>							
						</td>
						<td width="100" align="left">
							<input type="text" id="bookYear"/>
							
						</td>
						<td width="90" align="left">
						</td>
						<td>
							<h:outputText value=" 类  别 *"></h:outputText>
							<h:inputText value="#{modifyDocument.classify}" id="classify" />
							<h:message for="classify" style="color:red"></h:message>
						</td>
					
					</tr>
					<tr>
						<td align="right" width="100">
							<h:outputText value="网络链接"></h:outputText>				
						</td>
						<td colspan="3" align="left" width="650">
							<h:inputText value="#{modifyDocument.link}" style="width: 400px;height: 18px;"></h:inputText>
						</td>
						
					</tr>
					<tr>
						<td align="right" width="100">
							<h:outputText value="出  版 地"></h:outputText>
						</td>
						<td colspan="3" width="650">
							<h:inputText value="#{modifyDocument.placeofpublication}" style="width: 400px;height: 18px;"></h:inputText>
						</td>
					</tr>
					<tr>
						<td align="right" width="100">
							<h:outputText value="出  版 社"></h:outputText>
							
						</td>
						<td colspan="3" width="650">
							<h:inputText value="#{modifyDocument.press}" style="width: 400px;height: 18px;"></h:inputText>
						</td>
					</tr>
					<tr>
						<td align="right" width="100">
							<h:outputText value="第二作者"></h:outputText>
						
						</td>
						<td colspan="3" width="650">
							<h:inputText value="#{modifyDocument.secondauthor}" style="width: 400px;height: 18px;"></h:inputText>
						</td>
					</tr>
					<tr>
						<td align="right" width="100">
							<h:outputText value="第二标题"></h:outputText>
							
						</td>
						<td width="650" colspan="3">
							<h:inputText value="#{modifyDocument.secondtitle}" style="width: 400px;height: 18px;"></h:inputText>
						</td>
					</tr>
					<tr>
						<td align="right">
							<h:outputText value="页       码  "></h:outputText>
						</td>
						<td width="100" align="left">
							<h:inputText value="#{modifyDocument.pagenumber}"></h:inputText>
							
						</td>
						<td width="90">
						</td>
						<td>
							<h:outputText value=" 版        本  "></h:outputText>
							<h:inputText value="#{modifyDocument.version}"></h:inputText>
						</td>					
					</tr>
					<tr>
						<td align="right">
							<h:outputText value="ISBN  "></h:outputText>					
						</td>
						<td align="left" width="100">
							<h:inputText value="#{modifyDocument.isbn}"></h:inputText>
							
						</td>
						<td width="90">
						</td>
						<td>
							<h:outputText value=" 编       号  "></h:outputText>
							<h:inputText value="#{modifyDocument.serialnumber}"></h:inputText>
						</td>
					</tr>
					<tr>
						<td align="right" width="100">
							<h:outputText value="参考文献"></h:outputText>
						</td>
						<td colspan="3" width="650">
							<h:inputText value="#{modifyDocument.referencescited}" style="width: 400px;height: 18px;" />
						</td>
					</tr>
					<tr>
						<td align="right">
							<h:outputText value="语言"></h:outputText>
						</td>
						<td width="100" align="left">
							<h:inputText value="#{modifyDocument.language}"></h:inputText>
							
						</td>
						<td width="90">
						</td>
						<td>
							<h:outputText value="日        期  " ></h:outputText>
							<input type="text" id="datepicker" />
						</td>
					</tr>
					<tr>
						<td align="right" width="100">
							<h:outputText value="注    释  "></h:outputText>
						
						</td>
						<td colspan="3" width="650">
						   <h:inputText value="#{modifyDocument.note}"></h:inputText>
						</td>
						
					</tr>
					<tr>
						<td align="right" width="100">
							<h:outputText value="图片"></h:outputText>		
						</td>
						<td colspan="3" width="650">
							<input value="选择" type="button" onclick="$('#UpLoadDialog').dialog( 'open' );" />
							 <h:inputText id="Path" value="#{documentBean.image}" style="width:300px" />
						</td>
					</tr>
					 <tr>
						<td align="right" width="100">
							<h:outputText value="摘    要  *"></h:outputText>
						</td>
						<td rowspan="2" colspan="3" width="650">
							<h:inputTextarea rows="15" cols="75" id="summary" validator="#{documentBean.validateInput}" value="#{modifyDocument.summary}" />
							<br />
							<h:message for="summary" style="color:red"></h:message>
						</td>
					</tr>
					<tr>
						<td>
						</td>
					</tr>
					<tr>
						<td colspan="4">
							<hr size="1" color="#E0E0E0" />
						</td>
					</tr>
					<tr>		
						<td align="center" colspan="4">	
							<h:commandButton action="#{modifyDocument.updateDocument}" value="修改"></h:commandButton>
							<h:commandButton id="return" value="返回" onclick="javascript:history.back();">
							</h:commandButton>
						</td>
					</tr> 
								
				</table>
			</h:form>
			
		</p>
	</body>
</html>
